/* fly extension for PHP */

#ifndef PHP_FLY_H
# define PHP_FLY_H

extern zend_module_entry fly_module_entry;
# define phpext_fly_ptr &fly_module_entry

# define PHP_FLY_VERSION "0.1.0"

# if defined(ZTS) && defined(COMPILE_DL_FLY)
ZEND_TSRMLS_CACHE_EXTERN()
# endif


extern ZEND_API void replace_ns(zend_string *class_file);
extern ZEND_API void replace_ds(zend_string *class_file);
extern ZEND_API int get_namespace_len(zend_string *class);
extern ZEND_API zend_string *get_namespace(zend_string *class,int ns_len);
extern ZEND_API zend_string *get_classname(zend_string *class,int ns_len);
extern ZEND_API zval *find_namespace_paths(zval *ns_map,zend_string *namespace,int type);
extern ZEND_API int fly_include_file(zend_string *php_file,zval *retval);
extern ZEND_API int fly_autoload(zend_string *class_name, zend_string *class_file);

PHP_MINIT_FUNCTION(fly);
PHP_MSHUTDOWN_FUNCTION(fly);
PHP_RINIT_FUNCTION(fly);
PHP_RSHUTDOWN_FUNCTION(fly);
PHP_MINFO_FUNCTION(fly);

PHP_FUNCTION(fly_include);

PHP_METHOD(FlyLoad,__construct);
PHP_METHOD(FlyLoad,loadClass);
PHP_METHOD(FlyLoad,run);
PHP_METHOD(FlyLoad,register);

#endif	/* PHP_FLY_H */


